package com.zmn.mcc.common.dictionary;

import com.google.common.collect.Lists;
import com.zmn.common.dictionary.DictModel;
import com.zmn.mcc.common.constant.StaffLeaveOfficeConsts;

import java.util.ArrayList;
import java.util.List;

/**
 * @author quanjic
 * @version v1.0
 * @since 2019/10/15 19:48
 **/
public class StaffLeaveOfficeDict {


    /**
     * 关系：离职状态：1.离职，2.在职
     */
    public final static int STATUS_LEAVE = 1;
    public final static String STATUS_LEAVE_STR = "离职";
    public final static int STATUS_ON_THE_JOB = 2;
    public final static String STATUS_ON_THE_JOB_STR = "在职";
    /**
     * 描述:离职状态：1.离职，2.在职
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 9:59 2020/5/19
     **/
    public static List<DictModel> getLeaveStatusList() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(2);
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.STATUS_LEAVE, StaffLeaveOfficeConsts.STATUS_LEAVE_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.STATUS_ON_THE_JOB, StaffLeaveOfficeConsts.STATUS_ON_THE_JOB_STR));
        return arrayList;
    }

    public static String getLeaveStatusName(int roleType) {
        switch (roleType) {
            case StaffLeaveOfficeConsts.STATUS_LEAVE:
                return StaffLeaveOfficeConsts.STATUS_LEAVE_STR;
            case StaffLeaveOfficeConsts.STATUS_ON_THE_JOB:
                return StaffLeaveOfficeConsts.STATUS_ON_THE_JOB_STR;
            default:
                return "";
        }
    }

    /**
     * 描述:离职原因：1.家庭原因，2.个人原因，3.发展原因，4.合同到期不续签，5.协议解除，6.无法胜任工作，7.经济性裁员，8.严重违法乱纪，9.其他
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 9:59 2020/5/19
     **/
    public static List<DictModel> getLeaveReasonList() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(9);
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_FAMILY, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_FAMILY_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OWNER, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OWNER_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_DEVELOP, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_DEVELOP_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_CONTRACT, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_CONTRACT_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_AGREEMENT, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_AGREEMENT_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_INCOMPETENCE, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_INCOMPETENCE_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_ECONOMIC_LAYOFF, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_ECONOMIC_LAYOFF_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_YZWFLJ, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_YZWFLJ_STR));
        arrayList.add(new DictModel(StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OTHER, StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OTHER_STR));
        return arrayList;
    }

    public static String getLeaveReasonName(int roleType) {
        switch (roleType) {
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_FAMILY:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_FAMILY_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OWNER:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OWNER_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_DEVELOP:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_DEVELOP_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_CONTRACT:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_CONTRACT_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_AGREEMENT:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_AGREEMENT_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_INCOMPETENCE:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_INCOMPETENCE_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_ECONOMIC_LAYOFF:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_ECONOMIC_LAYOFF_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_YZWFLJ:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_YZWFLJ_STR;
            case StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OTHER:
                return StaffLeaveOfficeConsts.SEX_LEAVE_REASON_OTHER_STR;
            default:
                return "";
        }
    }

}
